<?php
/**
* 求职信息
*/
class ResumeShowControl extends ExtendControl
{
	public function __init()
	{
		header("Content-type: text/html; charset=utf-8");
	}

	public function index()
	{		
		//调用顶级城市
		$cityModel =  K('City');
		$topCity = $cityModel->topCity;
		$this->assign('topCity', $topCity);
		$PosCateModel = K('PosCate');
		//调用顶级职位类别
		$topPos = $PosCateModel->topPos;
		$this->assign('topPos', $topPos);
		#调用数据
		$ResumeInfoViewModel = K('ResumeInfoView');
		$facedata = $ResumeInfoViewModel ->get_face_data();
		$data = $ResumeInfoViewModel ->get_data();
		$this->assign('facedata',$facedata);
		$this->assign('data',$data);
		$this->display();
	}

	public function search()
	{
		//调用顶级城市
		$cityModel =  K('City');
		$topCity = $cityModel->topCity;
		$sonCity = $cityModel->get_all_son_by_pid(Q('get.city_one',0,'intval'));
		$this->assign('topCity', $topCity);
		$this->assign('sonCity', $sonCity);
		$PosCateModel = K('PosCate');
		//调用顶级职位类别
		$topPos = $PosCateModel->topPos;
		$sonPos = $PosCateModel->get_all_son_by_pid(Q('get.pos_one',0,'intval'));
		$this->assign('topPos', $topPos);
		$this->assign('sonPos', $sonPos);
		#调用数据
		$ResumeInfoViewModel = K('ResumeInfoView');
 		$data = $ResumeInfoViewModel ->get_all();
 		$hotData = $ResumeInfoViewModel ->get_hot_data(null,5);
		$page = $data['page'];
		unset($data['page']);
		foreach ($data as $key => $value) {
			$data[$key]['cityname'] = $cityModel->city[$data[$key]['city_cityid']];
		}
		$this->assign('data',$data);
		$this->assign('hotData',$hotData);
		$this->assign('page',$page);
		$this->display();
	}

	public function show()
	{
		$data = K('ResumeView')->get_all();	
		// if(!$data) $this->error('简历不存在',U('Resume/make1'));
		// p($data);
		$this->assign('data',$data);
		$this->display();
	}
	
}